/**
 *
 */
package com.magist.manage.enums;


import com.magist.core.enums.BaseEnum;
import com.magist.core.util.TxtUtil;

/**
 * 案例类型
 */
public enum CaseTypeEnum implements BaseEnum {


    GOV("GOV", "政府机关"),
    EDU("EDU", "教育培训"),
    MEDICINE("MEDICINE", "生物医疗"),
    MEDIA("MEDIA", "影视传媒"),
    TECH("TECH", "科技电子"),
    CAR("CAR", "汽车地产"),
    FINANCE("FINANCE", "金融投资"),
    HOTEL("HOTEL", "酒店餐饮"),
    MANUFACTURE("MANUFACTURE", "加工制造"),
    GROUP("GROUP", "集团公司"),
    WEB("WEB", "企业网站"),
    HTML5("HTML5", "HTML5"),
    EBUSINESS("EBUSINESS", "平台电商"),
    MICRO("MICRO", "移动微站");

    private String code;

    private String desc;

    private CaseTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CaseTypeEnum getByCode(String code) {
        if (TxtUtil.isEmpty(code))
            return null;
        CaseTypeEnum[] allEnums = CaseTypeEnum.values();
        for (CaseTypeEnum thisEnum : allEnums) {
            if (thisEnum.code.equals(code)) {
                return thisEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
